\contentsline {part}{I\hspace {1em}Introduction}{2}{part.1}% 
\contentsline {xpart}{Introduction}{2}{part.1}% 
\contentsline {section}{\numberline {1}zk-SNARKs}{2}{section.1}% 
\contentsline {subsection}{\numberline {1.1}Overview}{2}{subsection.1.1}% 
\contentsline {subsection}{\numberline {1.2}Background}{3}{subsection.1.2}% 
\contentsline {subsection}{\numberline {1.3}Efficiency}{3}{subsection.1.3}% 
\contentsline {subsection}{\numberline {1.4}Proof generation}{4}{subsection.1.4}% 
\contentsline {part}{II\hspace {1em}The Application}{5}{part.2}% 
\contentsline {xpart}{The Application}{5}{part.2}% 
\contentsline {section}{\numberline {2}ZoKrates}{6}{section.2}% 
\contentsline {subsection}{\numberline {2.1}ZoKrates JavaScript Wrapper}{6}{subsection.2.1}% 
\contentsline {section}{\numberline {3}Trusted Setup}{7}{section.3}% 
\contentsline {section}{\numberline {4}Smart Contracts}{10}{section.4}% 
\contentsline {subsection}{\numberline {4.1}Pre-Existing Contracts}{10}{subsection.4.1}% 
\contentsline {subsubsection}{\numberline {4.1.1}\texttt {ERC-721}}{10}{subsubsection.4.1.1}% 
\contentsline {subsubsection}{\numberline {4.1.2}\texttt {ERC-20}}{11}{subsubsection.4.1.2}% 
\contentsline {subsubsection}{\numberline {4.1.3}\texttt {ERC-165}}{12}{subsubsection.4.1.3}% 
\contentsline {subsubsection}{\numberline {4.1.4}\texttt {Utility contracts}}{12}{subsubsection.4.1.4}% 
\contentsline {subsection}{\numberline {4.2}Shield contracts}{12}{subsection.4.2}% 
\contentsline {subsubsection}{\numberline {4.2.1}\texttt {NFTokenShield.sol}}{12}{subsubsection.4.2.1}% 
\contentsline {subsubsection}{\numberline {4.2.2}\texttt {FTokenShield.sol}}{13}{subsubsection.4.2.2}% 
\contentsline {subsection}{\numberline {4.3}Verifier contracts}{13}{subsection.4.3}% 
\contentsline {subsubsection}{\numberline {4.3.1}\texttt {GM17.sol}}{13}{subsubsection.4.3.1}% 
\contentsline {subsubsection}{\numberline {4.3.2}\texttt {Points.sol}}{13}{subsubsection.4.3.2}% 
\contentsline {subsubsection}{\numberline {4.3.3}\texttt {GM17Library.sol}}{13}{subsubsection.4.3.3}% 
\contentsline {subsubsection}{\numberline {4.3.4}\texttt {Pairing.sol}}{13}{subsubsection.4.3.4}% 
\contentsline {subsection}{\numberline {4.4}Verifier Registry contracts}{14}{subsection.4.4}% 
\contentsline {subsubsection}{\numberline {4.4.1}\texttt {Verifier\_Registry\_Interface.sol}}{14}{subsubsection.4.4.1}% 
\contentsline {subsubsection}{\numberline {4.4.2}\texttt {Verifier\_Registry.sol}}{14}{subsubsection.4.4.2}% 
\contentsline {subsubsection}{\numberline {4.4.3}\texttt {Verifier\_Register\_Interface.sol}}{14}{subsubsection.4.4.3}% 
\contentsline {subsection}{\numberline {4.5}Deployment of Contracts}{14}{subsection.4.5}% 
\contentsline {section}{\numberline {5}Microservices}{15}{section.5}% 
\contentsline {subsection}{\numberline {5.1}zkp}{15}{subsection.5.1}% 
\contentsline {subsubsection}{\numberline {5.1.1}\texttt {f-token-controller.js}}{15}{subsubsection.5.1.1}% 
\contentsline {subsubsection}{\numberline {5.1.2}\texttt {f-token-zkp.js}}{15}{subsubsection.5.1.2}% 
\contentsline {subsubsection}{\numberline {5.1.3}\texttt {nf-token-controller.js}}{15}{subsubsection.5.1.3}% 
\contentsline {subsubsection}{\numberline {5.1.4}\texttt {nf-token-zkp.js}}{15}{subsubsection.5.1.4}% 
\contentsline {subsubsection}{\numberline {5.1.5}\texttt {zokrates.js}}{15}{subsubsection.5.1.5}% 
\contentsline {subsubsection}{\numberline {5.1.6}\texttt {vk-controller.js}}{15}{subsubsection.5.1.6}% 
\contentsline {subsubsection}{\numberline {5.1.7}\texttt {vkIds.json}}{16}{subsubsection.5.1.7}% 
\contentsline {subsubsection}{\numberline {5.1.8}\texttt {stats.json}}{16}{subsubsection.5.1.8}% 
\contentsline {subsection}{\numberline {5.2}offchain}{16}{subsection.5.2}% 
\contentsline {subsubsection}{\numberline {5.2.1}whisper}{16}{subsubsection.5.2.1}% 
\contentsline {subsubsection}{\numberline {5.2.2}pkd}{16}{subsubsection.5.2.2}% 
\contentsline {subsection}{\numberline {5.3}accounts}{17}{subsection.5.3}% 
\contentsline {subsection}{\numberline {5.4}database}{17}{subsection.5.4}% 
\contentsline {subsection}{\numberline {5.5}ui}{17}{subsection.5.5}% 
\contentsline {section}{\numberline {6}Finite Fields and Bit Lengths}{19}{section.6}% 
\contentsline {part}{III\hspace {1em}The Protocols}{22}{part.3}% 
\contentsline {xpart}{The Protocols}{22}{part.3}% 
\contentsline {section}{\numberline {7}ERC-721 (non-fungible) tokens}{23}{section.7}% 
\contentsline {subsubsection}{\numberline {7.0.1}Variables}{25}{subsubsection.7.0.1}% 
\contentsline {subsubsection}{\numberline {7.0.2}Key Management}{26}{subsubsection.7.0.2}% 
\contentsline {subsection}{\numberline {7.1}Mint}{27}{subsection.7.1}% 
\contentsline {subsubsection}{\numberline {7.1.1}Details}{29}{subsubsection.7.1.1}% 
\contentsline {subsection}{\numberline {7.2}Transfer}{31}{subsection.7.2}% 
\contentsline {subsubsection}{\numberline {7.2.1}Details}{34}{subsubsection.7.2.1}% 
\contentsline {subsection}{\numberline {7.3}Burn}{38}{subsection.7.3}% 
\contentsline {subsubsection}{\numberline {7.3.1}Details}{41}{subsubsection.7.3.1}% 
\contentsline {section}{\numberline {8}ERC-20 (fungible) Tokens}{44}{section.8}% 
\contentsline {subsubsection}{\numberline {8.0.1}Variables}{45}{subsubsection.8.0.1}% 
\contentsline {subsubsection}{\numberline {8.0.2}Key Management}{46}{subsubsection.8.0.2}% 
\contentsline {subsection}{\numberline {8.1}Mint}{47}{subsection.8.1}% 
\contentsline {subsubsection}{\numberline {8.1.1}Details}{49}{subsubsection.8.1.1}% 
\contentsline {subsection}{\numberline {8.2}Transfer}{51}{subsection.8.2}% 
\contentsline {subsubsection}{\numberline {8.2.1}Details}{54}{subsubsection.8.2.1}% 
\contentsline {subsection}{\numberline {8.3}Burn}{59}{subsection.8.3}% 
\contentsline {subsubsection}{\numberline {8.3.1}Details}{62}{subsubsection.8.3.1}% 
